//#define __DEBUG__
// by Xeno
#define THIS_FILE "x_m105.sqf"
#include "x_setup.sqf"
private ["_xtank", "_vehicle", "_poss"];

_mpos = markerPos QGVAR(sm_105);
_mpos set [2,0];
GVAR(x_sm_pos) = [_mpos]; //  destroy power generator in mine near Feruz-Abad
GVAR(x_sm_type) = "normal"; // "convoy"

#ifdef __SMMISSIONS_MARKER__
if (true) exitWith {};
#endif

if (X_Client && {!GVAR(IS_HC_CLIENT)}) then {
	GVAR(cur_sm_txt) = (localize "STR_DOM_SIDESTRING_1051");
	GVAR(current_mission_resolved_text) = (localize "STR_DOM_SIDESTRING_1052");
};

if (call FUNC(checkSHC)) then {
	__PossAndOther
	_vehicle = createVehicle [GVAR(sm_land_misc_cargo2e), _poss, [], 0, "NONE"];
	if (_vehicle isKindOf "ReammoBox_F") then { clearItemCargoGlobal _vehicle; clearMagazineCargoGlobal _vehicle; clearWeaponCargoGlobal _vehicle; };
	_vehicle setDir (markerDir QGVAR(sm_105));
	_vehicle setPos _poss;
	_vehicle call FUNC(addKilledEHSM);
	__AddToExtraVec(_vehicle)
	sleep 2.123;
	["specops", 2, "basic", 4, _poss,100,true] spawn FUNC(CreateInf);
	sleep 2.321;
	["shilka", 1, "bmp", 1, "tank", 1, _poss,1,250,true] spawn FUNC(CreateArmor);
};
